/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package game.platformer.levels;
import game.platformer.platformer;
import org.anddev.andengine.opengl.texture.Texture;
import org.anddev.andengine.opengl.texture.TextureOptions;
import org.anddev.andengine.opengl.texture.region.TextureRegion;
import org.anddev.andengine.opengl.texture.region.TextureRegionFactory;
/**
 *
 * @author cow
 */
public class grassTextureSet implements levelTexturePackage{
	//var block-------------------
	private Texture platformsT;
	private Texture backgroundT;
	private TextureRegion backgroundTR;
	private TextureRegion dirtBaseWideTR, dirtBaseHalfTR;
	private TextureRegion grassDecorWideTR, grassDecorHalfTR;
	private TextureRegion rockDecorWideTR, rockDecorHalfTR;
	//----------------------------
	//inherited function-------------------------
	public void loadTextures(platformer game){
		//set up the platforms
		platformsT = new Texture(512, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);

		dirtBaseWideTR = TextureRegionFactory.createFromAsset(platformsT, game, "grass/fancyDirtWide.png", 0, 0);
		grassDecorWideTR = TextureRegionFactory.createFromAsset(platformsT, game, "grass/grassDecorWide.png", 0, 32);
		rockDecorWideTR = TextureRegionFactory.createFromAsset(platformsT, game, "grass/rockDecorWide.png", 0, 48);

		dirtBaseHalfTR = TextureRegionFactory.createFromAsset(platformsT, game, "grass/fancyDirtHalf.png", 0, 64);
		grassDecorHalfTR = TextureRegionFactory.createFromAsset(platformsT, game, "grass/grassDecorHalf.png", 128, 64);
		rockDecorHalfTR = TextureRegionFactory.createFromAsset(platformsT, game, "grass/rockDecorHalf.png", 128, 80);

		//set up the back ground
		backgroundT = new Texture(1024, 512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
		backgroundTR = TextureRegionFactory.createFromAsset(backgroundT, game, "grass/Background.png", 0, 0);

		game.getEngine().getTextureManager().loadTextures(backgroundT, platformsT);
	}
	//-------------------------------------------

	//geters-------------------------------------
	public TextureRegion getDirtBasWide(){return dirtBaseWideTR;}
	public TextureRegion getDirtBasHalf(){return dirtBaseHalfTR;}
	public TextureRegion getGrassDecWide(){return grassDecorWideTR;}
	public TextureRegion getGrassDecHalf(){return grassDecorHalfTR;}
	public TextureRegion getRockDecWide(){return rockDecorWideTR;}
	public TextureRegion getRockDecHalf(){return rockDecorHalfTR;}
	public TextureRegion getBackground(){return backgroundTR;}

}
